package com.hxsz.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class DemoController {

    @GetMapping
    public Map<String, Object> hello(){
        Map<String, Object> ans = new HashMap<>();
        ans.put("code",200);
        ans.put("data","{name:Bruce}");
        return ans;
    }

    @GetMapping("/1")
    public Map<String, Object> hello1(){
        Map<String, Object> ans = new HashMap<>();
        ans.put("code",200);
        ans.put("data","{name:Jack}");
        return ans;
    }
}
